package com.telkomsigma.hibernate.services.team;


import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.telkomsigma.hibernate.common.PaginatedResult;
import com.telkomsigma.hibernate.persistence.team.dao.TeamDaoImpl;
import com.telkomsigma.hibernate.persistence.team.entity.Team;


@Service("teamService")
public class TeamServiceDao implements TeamService {

	@Autowired
	TeamDaoImpl teamDao;

	public void setTeamDao(TeamDaoImpl teamDao) {
		this.teamDao = teamDao;
	}
	
	@Override
	@Transactional(readOnly = false)
	public Team insert(Team transientInstance) {
		return teamDao.insert(transientInstance);
	}

	@Override
	@Transactional(readOnly = false)
	public Team update(Team detachedInstance) {
		return teamDao.update(detachedInstance);
	}

	@Override
	@Transactional(readOnly = false)
	public Boolean remove(Team persistentInstance) {
		return teamDao.remove(persistentInstance);
	}

	@Override
	@Transactional(readOnly = false)
	public Boolean removeList(List<Team> list) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Team findById(String id) {
		// TODO Auto-generated method stub
		return teamDao.findById(id);	
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public List<Team> findByProperty(String propertyName, Object value,
			int... rowStartIdxAndCount) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public List<Team> findAll(int... rowStartIdxAndCount) {
		return teamDao.findAll(rowStartIdxAndCount);
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public List<Team> findLikeProperty(String propertyName, Object value,
			int... rowStartIdxAndCount) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public List<Team> findLikeMapOfProperties(
			Map<String, Object> propertiesMap, int... rowStartIdxAndCount) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public List<Team> findByMapOfProperties(Map<String, Object> propertiesMap,
			int... rowStartIdxAndCount) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Integer countAll() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Integer countLikeProperty(String propertyName, Object value) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Integer countByProperty(String propertyName, Object value) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Integer countLikeMapOfProperties(Map<String, Object> propertiesMap) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Integer countByMapOfProperties(Map<String, Object> propertiesMap) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public PaginatedResult<Team> paginateLikeMapOfProperties(
			Map<String, Object> propertiesMap, int... rowStartIdxAndCount) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public PaginatedResult<Team> paginateAll(int... rowStartIdxAndCount) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public PaginatedResult<Team> paginateByMapOfProperties(
			Map<String, Object> propertiesMap, int... rowStartIdxAndCount) {
		// TODO Auto-generated method stub
		return null;
	}
}